const { hash } = window.location;
const paths = hash.substr(2).split("/");
const urlObj = new URL(window.location.href);
window.organizationUuid = urlObj.searchParams.get("oiUuid");
window.applicationUuid = urlObj.searchParams.get("aiUuid");
window.messageUuid = urlObj.searchParams.get("mmUuid");
window.messageActionParams = urlObj.searchParams.get("actionParams");
window.taskUuid = urlObj.searchParams.get("taUuid");

if (paths.length && ["messages"].includes(paths[0])) {
    window.currentWindow.maximizable = false;
    window.currentWindow.fullScreenable = false;
    window.currentWindow.resizable = false;
    window.currentWindow.unmaximize();
    window.currentWindow.restore();
} else {
    window.currentWindow.maximizable = true;
    window.currentWindow.fullScreenable = false;
    window.currentWindow.resizable = true;
    window.currentWindow.maximize();
    window.currentWindow.focus();
}
